package com.cyx.service;

import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Override
    public String add(String name,String password) throws Exception {
        System.out.println("add ");
        if (name.equals("exp")){
            throw new Exception("自定义异常");
        }
        return "1234";
    }

    @Override
    public void delete() {
        System.out.println("delete ");
    }

    @Override
    public void update() {
        System.out.println("update ");
    }

    @Override
    public void query() {
        System.out.println("query ");
    }
}
